home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
HyperLib 1997 Winter - Disc 1
/
HYPERLIB-1997-Winter-CD1.ISO.7z
/
HYPERLIB-1997-Winter-CD1.ISO
/
オンラインウェア
/
UTIL
/
CD Playthrough 1.5.sit
/
CD Playthrough 1.5
/
Source
/
SoundIn.c
< prev
next >
Wrap
Text File
|
1996-11-20
|
1KB
|
47 lines
// CD Playthrough
// Version: 1.5 <October 3, 1994>
// (c) 1994 neg.active.productions, jwang@csua.berkeley.edu <James Wang>
// ftp://ftp.csua.berkeley.edu/pub/jwang/cool/cd-playthrough-15.hqx
// File: SoundIn.c
//
// Contains: Sound input sub-routines
//
// Written by: Gary Anwyl, James Wang
//
// Description: Opens the default input device (0), gets and sets
// both the input source ('sour') and playthrough ('plth')
// options via standard information selectors.
#include "main.h"
void get_sound_in(SoundSetting *mySnd)
{
long siRefNum;
OSErr err;
err = SPBOpenDevice(0, siReadPermission, &siRefNum);
if (err) stop_alert(siReadDevFailed);
err = SPBGetDeviceInfo(siRefNum, 'plth', (Ptr) &(mySnd->siCurrPlth));
err = SPBGetDeviceInfo(siRefNum, 'sour', (Ptr) &(mySnd->siCurrSour));
if (err) stop_alert(siGetDevInfoFailed);
SPBCloseDevice(siRefNum);
}
void set_sound_in(SoundSetting *mySnd)
{
long siRefNum;
OSErr err;
err = SPBOpenDevice(0, siWritePermission, &siRefNum);
if (err) stop_alert(siWriteDevFailed);
err = SPBSetDeviceInfo(siRefNum, 'plth', (Ptr) &(mySnd->siWantPlth));
err = SPBSetDeviceInfo(siRefNum, 'sour', (Ptr) &(mySnd->siWantSour));
if (err) stop_alert(siSetDevInfoFailed);
SPBCloseDevice(siRefNum);
}